// vue.config.js
module.exports = {
    publicPath: './',
    productionSourceMap: false,
    chainWebpack(config) {
        //修改htmlWebpackPlugin
        config.plugin('html').tap(args => {
            args[0].title = '赢缠大师';
            return args;
        })
    },
    pwa: {
        workboxOptions: {
            // https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin
            skipWaiting: true,
            clientsClaim: true,
            importWorkboxFrom: 'local',
            importsDirectory: 'js',
            navigateFallback: '/',
            navigateFallbackBlacklist: [/\/api\//]
        }
    },
    devServer: {
        proxy: {
            '/api': {
                target: 'http://123.57.31.5:8000/',
                changeOrigin: true,
                pathRewrite: {
                    '/api': ''
                },
            },
        },
        https: true
    }
}